<?php

namespace MyApp\Hook;

class User
{
    public static function beforeCreate($user)
    {
        // 用户创建时初始化应用相关属性
        $user->coins = 0;
        $user->nbraffled = 0;
    }
}